package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

@TableName("t_user")
public class UserBean {
    /**
     * 用户id
     */
    @TableId(value = "pk_userId",type = IdType.AUTO)
    private Integer id;
    /**
     * 用户名
     */
    @TableField("u_name")
    private String name;
    /**
     * 密码
     */
    @TableField("u_pwd")
    private String pwd;
    /**
     * 等级
     */
    @TableField("u_grade")
    private String grade;
    /**
     * 订单集合
     */
    @TableField(exist = false)
    private List<OrderBean> orderList;
    /**
     * 购物车对象
     */
    @TableField(exist = false)
    private CarBean carBean;

    public UserBean() {
    }

    public UserBean(String name, String pwd, String grade) {
        this.name = name;
        this.pwd = pwd;
        this.grade = grade;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public List<OrderBean> getOrderList() {
        return orderList;
    }

    public void setOrderList(List<OrderBean> orderList) {
        this.orderList = orderList;
    }
}
